home *** CD-ROM | disk | FTP | other *** search
- #ifndef _DTUOBJ_HPP
- #define _DTUOBJ_HPP
-
- #include "dtobase.hpp"
-
- class METAEXPORTCLASSDEF DTUObject : public DTObject {
- public:
- DTUObject( const MetaObject * meta, WObject * imp = NULL );
- ~DTUObject();
-
- public:
- WBool operator== ( const DTObject & ) const;
- void DTGetRectangle( WRect & r,
- WBool abs = FALSE ) const;
- void DTSetRectangle( const WRect & r, WBool abs = FALSE );
- void DTGetClientRectangle( WRect & r ) const;
- void DTGetRCRectangle( WRect & r ) const;
- WRect DTMapPixelsToDLU( const WRect & pix ) const;
- WRect DTMapDLUToPixels( const WRect & dlu ) const;
- void DTBringToTop();
- void DTRepaint( WRect * rect=NULL );
- void GenFileFragment( MMFileFragment fg, WStringList &,
- MMFileGenerationParms * parms ) const;
- void GenerateCode( MMCodeGeneration, ostream &, MMCodeGenerationParms & );
- void GetRequiredIncludes( WStringList & a ) const;
- void GetRequiredBaseClasses( WStringList & a ) const;
- const MetaObject * GetMeta() const;
- void SetMeta( const MetaObject * );
- const MetaObject * GetRefCardMeta() const;
- void DTSetName( const WString & name );
- WString DTGetName() const;
- WString DTGetClassName() const;
- void SetClassDefinition( const WString & );
- WString GetClassDefinition() const;
- void SetClassIncludes( const WString & );
- WString GetClassIncludes() const;
- WObject * GetWImplementation() const;
- void SetWImplementation( WObject * wobj, WBool deleteOld );
- DTObject * GetConcreteImplementation();
- const DTObject *GetConcreteImplementation() const;
- WWindow * GetWindow() const;
- WWindow * DTGetParent() const;
- void SetResourceID( long id );
- long GetResourceID() const;
- void SetTabIndex( long idx );
- long GetTabIndex() const;
- const DTCodeBlockList & GetCodeBlockList() const;
- DTCodeBlockList & GetCodeBlockList();
- WInt GetAllCodeBlockLists( DTCodeBlockListList & );
- DTCodeBlockBase * RemoveEvent( DTCodeBlockBase * );
- DTCodeBlockBase * FindEvent( const char * ) const;
- WBool AllowEvent( const MMEvent * ) const;
- FormEdit * GetForm() const;
- DTFormEditBase *GetDTForm() const;
- void SetForm( DTFormEditBase * );
- int GetChildCount() const;
- DTObject * GetChild( int index ) const;
- WBool AddChild( DTObject *, int after = -1 );
- WBool RemoveChild( DTObject * );
- DTObject * GetParent() const;
- WStyle GetStyle() const;
- WBool SetStyle( WStyle stl, WBool clone=FALSE );
- WStyle GetDefaultStyle() const;
- WStyle GetExtendedStyle() const;
- WBool SetExtendedStyle( WStyle style, WBool clone=FALSE );
- WStyle GetDefaultExtendedStyle() const;
- void SetInternalStyle( WStyle s, WStyle ex );
- WBool Create( WWindow * parent, const WRect & r,
- const WChar * text, WStyle style,
- WStyle exStyle, void * data = NULL,
- WBool isLoading = FALSE );
- WBool GetNonVisual() const;
- WBool HasDTInfo();
- WBool SaveDTInfo( SaveSource & );
- WBool LoadDTInfo( SaveBlock *, WBool beforeCreate );
- WBool CreateEventPopupMenu( WPopupMenu * popup );
- WBool GetVisible();
- WBool SetVisible( WBool visible );
- WBool GetIsMoveable();
- WBool GetIsResizeable();
- WBool GetIsHollow(); // groupbox
- WRect GetHollowRect(); // interior of groupbox
- WBool SetDTPopupMenu( DTObject * );
- DTObject * GetDTPopupMenu() const;
- void AmendPopup( WPopupMenu *, WBool before );
- WBool IsValidChild( const MetaObject *obj, WString &errMsg ) const;
- WBool IsValidContainer( const DTObject *obj, WString &errMsg ) const;
- WBool DTSetEventHandler( WEventID id, WObject * object, WEventHandler handler, void *userdata=NULL );
- WBool DTRemoveEventHandler( WEventID id, WObject * object, WEventHandler handler );
- WBool DTCallEventHandler( WEventID id, WObject * object, WEventData * eventData=NULL, WLong * retval=NULL, WInt indexToStartAt=0 ) const;
- DTIInterface * GetDTIInterface( const WChar * ifname );
- WBool GetProtected() const;
- WBool EditProperties( WWindow *, WBool child = FALSE );
- void ClearPropertyEditor( WBool deleteNow = FALSE );
- WBool UpdatePropertyRect();
- MTPropertyDialog * GetPropDialog();
- WBool HasProperty( const WString & name ) const;
- WString GetProperty( const WString & name, DT_TextifyV t = 1 ) const;
- WBool GetPropertyBool( const WString & name ) const;
- WLong GetPropertyEnum( const WString & name ) const;
- WRect GetPropertyRect( const WString & name ) const;
- WLong GetPropertyLong( const WString & name ) const;
- WBool SetProperty( const WString & name, const WString & val, DT_TextifyV t = 1 );
- WBool SetPropertyBool( const WString & name, WBool val );
- void SetPropertyEnum( const WString & name, WLong val );
- void SetPropertyRect( const WString & name, const WRect & r );
- void SetPropertyLong( const WString & name, WLong r );
- WString GetMappedValue( WUInt i ) const;
- void SetMappedValue( WUInt i, const WString & s );
- void PropertyChanged( const WString & name );
- void SetAllowUpdates( WBool allow, WBool doPropertyChanged = TRUE );
- WBool GetAllowUpdates() const;
- void DetachEditor();
- WString GetObjectPrefix() const;
- void GenName( WUInt id, WString & ) const;
- void GenClassName( WString & ) const;
- void GenResourceName( WString & ) const;
- void GenResourceStyles( WStringList &, WStringList & ) const;
- void GenEventObjectName( WString & ) const;
- const MMStyle * FindStyle( const char * ) const;
- const MMProperty * FindProperty( const char * ) const;
- DTObjectImp * GetImplementation();
- void EscapeCString( WString &, const WString & ) const;
-
- DTUserFunctionVect const & GetUserFunctionVect( void ) const;
- DTUserFunctionVect & GetUserFunctionVect( void );
- void AddUserFunction( DTCodeBlockBase * );
- void RemoveUserFunction( DTCodeBlockBase * );
- DTCodeBlockBase * FindUserFunction( char const * );
- DTCodeBlockBase * GetCMCodeBlock( unsigned long ) const;
- void SetCMCodeBlock( unsigned long, DTCodeBlockBase * );
-
- private:
- DTObject * _base;
- };
-
- #endif // _DTUOBJ_HPP
-